package com.ericpol.patternobject;

import org.openqa.selenium.WebDriver;


public class LoginPage extends Page {
	private String loginButtonPath = "/html/body/div/div[2]/div[2]/div[2]/div[2]/div/form/input";
	
	public LoginPage(WebDriver driver){
		super(driver);
		chooseAddress("http://demo.bananascrum.com/session/new");
	}
	
	public MainPage login(String login, String password){
		insertText("//*[@id='login']", login);
		insertText("//*[@id='password']", password);
		clickXPath(loginButtonPath);
		return new MainPage(driver);
	}
}
